package com.shenbao.service.impl;

import com.shenbao.beans.Department;
import com.shenbao.dao.DepartmentMapper;
import com.shenbao.service.IDepartmentService;

import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

@Service("DepartmentServiceImpl")
public class DepartmentServiceImpl implements IDepartmentService {
    @Resource
    public DepartmentMapper departmentMapper;

    public int deleteByPrimaryKey(Integer id) {
        return departmentMapper.deleteByPrimaryKey(id);
    }

    public int insert(Department record) {
        return departmentMapper.insert(record);
    }

    public int insertSelective(Department record) {
        return departmentMapper.insertSelective(record);
    }

    public Department selectByPrimaryKey(Integer id) {
        return departmentMapper.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Department record) {
        return departmentMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(Department record) {
        return departmentMapper.updateByPrimaryKey(record);
    }

    public int getTotalCount() {
        return departmentMapper.getTotalCount();
    }

    public int getCountByParameterName(String parameterName) {
        return departmentMapper.getCountByParameterName(parameterName);
    }

    public List<Department> selectByPaingAndCondition(Map<String, String> map) {
        return departmentMapper.selectByPaingAndCondition(map);
    }

	@Override
	public List<Department> getalldepartment() {
		return departmentMapper.getalldepartment();
	}
}